<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div class="wrap" id="app">
        <div class="logo" src="img/logo.png" alt="logo"></div>
        <div class="from_group">
            <input
            type="text"
            class="input_txt"
            placeholder="请输入查询数据"
            v-model="sname"
            />
            <button class="input_sub" @click="searchWeather">搜索</button>
        </div>
        <table width="300" border="1">
            <tr>
                <td>名字</td>
                <td>年龄</td>
            </tr>
            <tr v-for="item in student">
                <td>{{item.sname}}</td>
                <td>{{item.age}}</td>
            </tr>
        </table>
    </div>

<script src="js/vue.js"></script>
<script src="js/axios.min.js"></script>

<script>
    let app=new Vue({
        el:"#app",
        data:{
            student:[],
            sname:"",
        },
        methods:{
            searchWeather() {
                axios.post("http://localhost:8080/student/list/1/5", {sname:this.sname}).then(result => {
                        this.student = result.data.data.records;
                    })

            }
        }
    })
</script>
</body>

</html>